package net.techfuser.bigscreen;

import com.alibaba.fastjson.JSONObject;
import org.apache.flink.api.java.functions.KeySelector;

/**
 * @Description:
 * @Author 左龙龙
 * @Date 21-4-6
 * @Version 1.0
 **/
public class EntRegionChannelKeySelector implements KeySelector<JSONObject, EntRegionChannelKey> {

    @Override
    public EntRegionChannelKey getKey(JSONObject value) throws Exception {
        EntRegionChannelKey row = new EntRegionChannelKey();
        row.ent_id = value.getLong("ent_id");
        row.region_code = value.getString("region_code");
        row.region_name = value.getString("region_name");
        row.channel_keyword = value.getString("channel_keyword");
        return row;
    }
}
